/*
package com.bwda.dsrs.businessservice.controller;


import com.bwda.dsrs.filecenter.api.clientappversion.file.FileParameterTemplate;
import com.bwda.dsrs.filecenter.api.clientappversion.file.FileWatermarkTemplate;
import com.bwda.dsrs.filecenter.api.clientappversion.file.SensitiveTemplate;
import com.bwda.dsrs.filecenter.aspect.LogTypeEnum;
import Loggable;
import com.bwda.dsrs.filecenter.domain.exception.BusinessServiceException;
import com.bwda.dsrs.filecenter.domain.vo.clientappversion.SensitiveRexTemplate;
import com.bwda.dsrs.base.centerbase.response.ResponseEntity;
import com.bwda.dsrs.filecenter.api.FileServiceAPI;
import com.bwda.dsrs.filecenter.api.base.ApiResult;
import com.bwda.dsrs.filecenter.domain.form.toolcenter.FileEncryption;
import com.bwda.dsrs.filecenter.domain.form.toolcenter.FileExternalHair;
import com.bwda.dsrs.filecenter.domain.form.toolcenter.FileSensetive;
import com.bwda.dsrs.filecenter.domain.form.toolcenter.FileWatermark;
import com.bwda.dsrs.filecenter.api.ToolCenterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.list;

*/
/**
 * 工具中心
 *
 * @author youzhen
 *//*

@RestController
@RequestMapping("/tool")
@Api(value = "/tool", tags = "工具中心")
public class ToolCenterController extends BaseController {

    @Autowired
    private FileServiceAPI fileServiceAPI;

    @Autowired
    private ToolCenterService toolCenterService;

    @ApiOperation(value = "本地外发", notes = "本地外发", httpMethod = "GET")
    @Loggable(descp = "本地外发",type = LogTypeEnum.SETTING,include = "")
    @RequestMapping(value = "/getExternalHair", method = {RequestMethod.GET, RequestMethod.POST})
    public ResponseEntity<String> getExternalHair(@ModelAttribute @Valid FileExternalHair form) throws BusinessServiceException {

        return getSuccessResult();
    }

    @ApiOperation(value = "文件水印", notes = "文件水印", httpMethod = "GET")
    @Loggable(descp = "文件水印",type = LogTypeEnum.SETTING,include = "")
    @RequestMapping(value = "/getWatermark", method = {RequestMethod.GET, RequestMethod.POST})
    public ResponseEntity<Object> getWatermark(@ModelAttribute @Valid FileWatermark form) throws BusinessServiceException {
        FileParameterTemplate fileParameterTemplate = new FileParameterTemplate();
        Integer[] id = {4};fileParameterTemplate.setId(id);
        FileWatermarkTemplate fileWatermarkTemplate = new FileWatermarkTemplate();
        fileWatermarkTemplate.setWatermarkType(1);fileWatermarkTemplate.setSourceFile(form.getFileRemotePath());
        fileWatermarkTemplate.setFontName(form.getTypeFace());fileWatermarkTemplate.setFontSize(form.getFontSize());
        fileWatermarkTemplate.setColorStr(form.getColor());fileWatermarkTemplate.setRotation(form.getInclination());
        fileWatermarkTemplate.setRow(form.getRowNumber());fileWatermarkTemplate.setColumn(form.getColumnNumber());
        fileWatermarkTemplate.setTransparency(form.getTransparency());fileWatermarkTemplate.setImageHeight(form.getHeight());
        fileWatermarkTemplate.setImageWidth(form.getWidth());fileWatermarkTemplate.setText(form.getContent());
        fileParameterTemplate.setFileTemplate(fileWatermarkTemplate);
        ApiResult apiResult = fileServiceAPI.getFile(fileParameterTemplate);
        return getSuccessResult(apiResult.getData());
    }

    @ApiOperation(value = "文件脱敏", notes = "文件脱敏", httpMethod = "GET")
    @Loggable(descp = "文件脱敏",type = LogTypeEnum.SETTING,include = "")
    @RequestMapping(value = "/getSensetive", method = {RequestMethod.GET, RequestMethod.POST})
    public ResponseEntity<Object> getSensetive(@ModelAttribute @Valid FileSensetive form) throws BusinessServiceException {
        FileParameterTemplate fileParameterTemplate = new FileParameterTemplate();
        Integer[] id = {3};fileParameterTemplate.setId(id);
        SensitiveTemplate sensitiveTemplate = new SensitiveTemplate();
        list<String> idList = form.getSensitiveField();
        String groupstr = form.getSensitiveContent();
        String[] str = groupstr.split(",");
        list<SensitiveRexTemplate> sensitiveRexlist = toolCenterService.getSensitive(idList);
        sensitiveTemplate.setFileRemotePath(form.getFileRemotePath());
        for(int i=0;i<str.length;i++){
            SensitiveRexTemplate sensitiveRexTemplate = new SensitiveRexTemplate();
            sensitiveRexTemplate.setFindRex(str[i]);
            sensitiveRexTemplate.setReplaceRex("("+str[i]+")");
            sensitiveRexTemplate.setGroupStr("1");
            sensitiveRexlist.add(sensitiveRexTemplate);
        }
        sensitiveTemplate.setSearchRex(sensitiveRexlist);
        fileParameterTemplate.setReplaceParameter(sensitiveTemplate);
        ApiResult apiResult = fileServiceAPI.getFile(fileParameterTemplate);
        return getSuccessResult(apiResult.getData());
    }

    @ApiOperation(value = "文件加密", notes = "文件加密", httpMethod = "POST")
    @Loggable(descp = "文件加密",type = LogTypeEnum.SETTING,include = "")
    @RequestMapping(value = "/addDir", method = {RequestMethod.GET, RequestMethod.POST})
    public ResponseEntity<String> addDir(@ModelAttribute @Valid FileEncryption form) throws BusinessServiceException {

        return getSuccessResult();
    }


}*/
